1. Field of the Invention
The present invention relates to method, computer program and video game device for creating a maze map that includes a start point and a goal point. The start and goal points should be connected with each other via at least one route.
2. Description of the Related Art
In video games, a lot of kinds of map are represented as maze maps. For example, maze maps represent a dungeon, a cave, a town, a building, etc.
Distribution media of some video games record predetermined data of maze maps. In these video games, maze maps are displayed according to the predetermined data so that the maze maps are fixed as a general.
Instead of the predetermined data of maze maps, distribution media of other video games record maze generator programs, which generate data of random maze maps within predetermined size. If the predetermined size of maze map is enough large, the maze generator program does not generate same maze map substantially. The maze generator program may change a maze map of one building each time when the player of the video game enters the building. The maze generator program can prevent boring the player of the video game.
Description will be made about typical maze generator program. First, the program divides a screen into m*n rectangular areas in each of which at most one room is locatable. Next, the program decides whether a room is located or not in each areas at random, and decides sizes and positions of the rooms to be located at random. Then, the program decides whether a path is located between two rooms in adjacent areas or not, and decides the route of the paths to be located at random. Here at least one path is connected to each room in order that no room is isolated from other rooms.
Complexity of maze largely depends on complexity of the paths. According to the typical maze generator program mentioned above, however, the paths are located after the rooms are located so that the routes of the paths are tightly limited. Consequently, complexity of maze is limited so that similar mazes tend to be generated frequently.
It is an object of the present invention to provide a method, a recording medium recorded a video game program, and a video game device for automatically generating data of maze map with higher complexity.
According to the present invention, a method, a computer-readable storage medium and a video game device as following are provided.
The present invention provides a method of automatically generating a maze map by computer. The maze map includes at least one floor that is composed of arrayed rectangular blocks. The floor includes a start block and a goal block, the start and goal blocks being connected with each other via at least a trunk path. The method comprises the steps of: (a) generating the floor composed of plural rectangular blocks; (b) designating one of the blocks from the floor as the start block; (c) designating a trunk path which is a sequence of blocks designated from the floor and which starts from the start block; (d) designating at least one block as an intersection block from the trunk path; and (e) designating at least one branch path which is a sequence of blocks designated from the floor and which starts from the intersection block.
According to the method, the floor may be a two-dimensional array composed of mxc3x97n rectangular blocks (m and n are natural numbers).
When the trunk path is composed of X rectangular blocks (X is a natural number) B1, B2, B3 . . . Bx, the step (c) may designate the blocks B1, B2, B3 . . . Bx according to the steps of: (c1) designating the start block B1 as the current block which has been currently selected as one block of the trunk path; (c2) selecting one of the blocks adjacent to the current block; (c3) designating the selected block as the next current block; and (c4) repeating the steps (c2) and (c3) until the block Bx is designated.
When the branch path is composed of X rectangular blocks (X is a natural number) B1, B2, B3 . . . Bx, the step (e) may designate the blocks B1, B2, B3 . . . Bx according to the steps of: (e1) designating the intersection block B1 as the current block which has been currently selected as one block of the branch path; (e2) selecting one of the blocks adjacent to the current block; (e3) designating the selected block as the next current block; and (e4) repeating the steps (e2) and (e3) until the block Bx is designated.
Further, the present invention provides a computer-readable storage medium and a video game device for generating a maze map according to the above-mentioned method.